package com.mew.chess.core.game.qmcs.game.common;

import com.mew.common.vo.UserSessionVO;
import com.zebra.common.ByteBufUtils;
import io.netty.buffer.ByteBuf;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.util.HashMap;


@Data
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
public class QmcsUserBO extends UserSessionVO {

    private long bet ; //
    private long payment ; //

    private int freeBetId = -1;

    private int freeTimes;

    private HashMap<Integer ,HashMap<Integer, QmcsLog>> fishLogMap = new HashMap<>();  //押注  鱼

    @Override
    public void write(ByteBuf b) {
        super.write(b);

        ByteBufUtils.writeInt(b, getSeatNo());

        ByteBufUtils.writeInt(b,freeBetId);
        ByteBufUtils.writeInt(b,freeTimes);
    }


    @Override
    public String toString() {
        return "FishUserBO{" +
                "uid=" + getUserId() +
                ", nickname=" + getNickname() +
                ", headPath=" + getHeadPath() +
                ", goldNumber=" + getGoldNumber() +
                '}';
    }
}
